<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2019/3/28
 * Time: 10:43
 */
namespace common\sources\read\taskcommodkeywords;

use common\models\craftsman\TaskCommodKeywords;

class TaskCommodKeywordAccess implements ITaskCommodKeywordAccess
{
   public function addTaskCommodKeyword($data)
   {
       // TODO: Implement addTaskCommodKeyword() method.
   }

   public function TaskCommodKeyword($id) {
       return TaskCommodKeywords::find()
           ->select("id,bus_id,task_commod_id,word,num,use_num,update_time,create_time")
           ->where(['task_commod_id' => $id])
           ->asArray()
           ->all();
   }


	public function getTaskCommodKeywordById($task_commod_keyword_id) {
		return TaskCommodKeywords::find()
			->select("id,bus_id,task_commod_id,word,num,use_num,create_time")
			->where('id = ' . $task_commod_keyword_id)
			->asArray()
			->one();
	}
}